import 'package:flutter/material.dart';
import '../pages/home.dart';
import '../pages/login.dart';
import '../pages/app.dart';
import '../pages/daily.dart';
import '../pages/user.dart';





var onGenerateRoute = (RouteSettings settings) => PageRouteBuilder(
    settings:settings,
    transitionDuration:Duration(milliseconds:300),
    pageBuilder:(context,animation,secondaryAnimation){
      switch(settings.name){
        case '/app':return const App();
        case '/': return const Home();
        case '/daily': return const Daily();
        case '/login': return const Login();
        case '/user': return const User();
        default:return const Home();
      }
      },
    transitionsBuilder:(context,animation,secondaryAnimation, child) {
      return FadeTransition(
        opacity: animation,
        child: child,
      );
    }
);